<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}
        {% endblock %}
    </title>
    <link rel="icon" href="/static/image/sparrow.ico" type="image/x-icon">
    <link rel="shortcut icon" href="/static/image/sparrow.ico" type="image/x-icon">
</head>
{% block scrtpt %}
    <script src="/static/js/jquery-3.6.0.js"></script>
    <link rel="stylesheet" href="/static/js/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/static/js/bootstrap/css/bootstrap-theme.css">
    <script src="/static/js/bootstrap/js/bootstrap.js"></script>
{% endblock %}
{% block style %}
{% endblock %}
<body>
{% block navbar %}
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{ url_for('user.mainPage') }}">博客</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
{#                <ul class="nav navbar-nav">#}
{#                    <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>#}
{#                    <li><a href="#">Link</a></li>#}
{#                    <li class="dropdown">#}
{#                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"#}
{#                           aria-expanded="false">Dropdown <span class="caret"></span></a>#}
{#                        <ul class="dropdown-menu">#}
{#                            <li><a href="#">Action</a></li>#}
{#                            <li><a href="#">Another action</a></li>#}
{#                            <li><a href="#">Something else here</a></li>#}
{#                            <li role="separator" class="divider"></li>#}
{#                            <li><a href="#">Separated link</a></li>#}
{#                            <li role="separator" class="divider"></li>#}
{#                            <li><a href="#">One more separated link</a></li>#}
{#                        </ul>#}
{#                    </li>#}
{#                </ul>#}
                <form class="navbar-form navbar-left" action="{{ url_for('article.searchArticle') }}" method="post">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="Search" name="title">
                    </div>
                    <button type="submit" class="btn btn-default">搜索</button>
                </form>
                <a href="{{ url_for('article.articleAdd') }}"><button type="button" class="btn btn-primary">发表文章</button></a>
                <ul class="nav navbar-nav navbar-right">
                    {% if user %}
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                               aria-haspopup="true"
                               aria-expanded="false"><img src="/static/image/upload/photo/{{ user[5] }}" alt=""
                                                          class="img-circle" width="35" height="35">
                                {{ user[1] }}
                                <span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="{{ url_for('user.userRegister') }}">注册用户</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="{{ url_for('user.userCenter') }}">个人中心</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="{{ url_for('user.contentManagement')}}">内容管理</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="{{ url_for('user.userLogout') }}">退出登录</a></li>
                            </ul>
                        </li>
                    {% endif %}
                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
{% endblock %}
</body>
{% block content %}

{% endblock %}
</html>
{% block myjs %}

{% endblock %}